javascript code to find area of triangle